package com.szu.subject.ui.serviceImpl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.szu.subject.domains.Major;
import com.szu.subject.ui.mapper.MajorMapper;
import com.szu.subject.ui.service.MajorService;

@Service
public class MajorServiceImpl implements MajorService{

	private MajorMapper majorMapper;
	@Override
	public List<Major> getAllMajor() {
		return majorMapper.getAllMajor();
	}

	@Override
	public Major getMajorByPK(Long id) {
		return majorMapper.getMajorByPK(id);
	}

	@Override
	public Major createMajor(Major major) {
		majorMapper.createMajor(major);
		return major;
	}

	@Override
	public Major updateMajor(Major major) {
		majorMapper.updateMajor(major);
		return major;
	}

	@Override
	public int deleteMajor(Long id) {
		return majorMapper.deleteMajor(id);
	}

	@Override
	public List<Major> batchCreateMajors(List<Major> majors) {
		majorMapper.batchCreateMajors(majors);
		return majors;
	}

	@Override
	public List<Major> batchUpdateMajors(List<Major> majors) {
		majorMapper.batchUpdateMajors(majors);
		return majors;
	}

	@Override
	public int batchDeleteMajors(List<Long> ids) {
		return majorMapper.batchDeleteMajors(ids);
	}

}
